package org.mozhu.mboot.core.web.resource;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.List;

@Configuration
public class WebResourceConfigurerAutoConfiguration {

    @Bean
    public CombineWebResourceConfigurer combineWebResourceConfigurer(List<WebResourceConfigurer> webResourceConfigurers) {
        return new CombineWebResourceConfigurer(webResourceConfigurers);
    }

    @Bean
    @ConditionalOnMissingBean
    public StaticWebResourceConfigurer staticWebResourceConfigurer() {
        return new StaticWebResourceConfigurer();
    }

    @Bean
    @ConditionalOnMissingBean
    public ExternalWebResourceConfigurer externalWebResourceConfigurer() {
        return new ExternalWebResourceConfigurer();
    }

    @Bean
    @ConditionalOnMissingBean
    public ThemeWebResourceConfigurer themeWebResourceConfigurer() {
        return new ThemeWebResourceConfigurer();
    }
}
